#地图写入文件
import os
fout = open("map.txt","w")
fout.write("0,0,0,3,3,0,0\n")
fout.write("0,0,0,3,3,0,0\n")
fout.write("0,0,0,3,3,0,0\n")
fout.write("0,0,0,3,3,0,0\n")
fout.write("0,0,0,3,3,0,0\n")
fout.close()    #注意，close 函数的括号不要丢了，否则文件关闭失败

#fin = open("//Users//kun//Documents//python//Python//map.txt","r")
fin = open("map.txt")
arr = []
while True:
    line = fin.readline()
    if line == "":
        break
    line = line.replace("\n","")
    arr.append(line.split(","))
fin.close()
print(arr)